Skip to content

[photon-lib] Fix incorrect tag visualization transforms#1899

Merged
mcm001 merged 3 commits intoPhotonVision:mainfrom
amquake:fix-tag-viz
Apr 29, 2025
Merged

[photon-lib] Fix incorrect tag visualization transforms#1899
mcm001 merged 3 commits intoPhotonVision:mainfrom
amquake:fix-tag-viz

Conversation

@amquake
Copy link
Copy Markdown
Member

@amquake amquake commented Apr 15, 2025

Description

Fixes #1239

Tag image corners used in VideoSimUtil did not match the expected corner order returned by the detection pipeline of [BL, BR, TR, TL], causing the tag image to appear flipped.

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR addresses a bug, a regression test for it is added

@amquake amquake requested a review from a team as a code owner April 15, 2025 01:25
@mcm001
Copy link
Copy Markdown
Contributor

mcm001 commented Apr 15, 2025

Can we get some WAS/SHOULD BE/IS screenshots?

@samfreund
Copy link
Copy Markdown
Member

Do we have tests for this? If we don't, we should probably write them, and if we do I'm guessing they need to be updated.

Copy link
Copy Markdown
Contributor

@mcm001 mcm001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can now detect tags with my iphone, seems vaguely legit 👍 And my tag corners didnt change, just the image.

OLD

    PhotonPipelineResult [metadata=PhotonPipelineMetadata [captureTimestampMicros=325917, publishTimestampMicros=325917, sequenceID=1, timeSinceLastPong=976], targets=[PhotonTrackedTarget [yaw=-0.8951797020245975, pitch=10.529540329891427, area=0.8225680236274558, skew=0.0, fiducialId=18, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 1.66, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(-0.004197867305465619, -1.1983705590634663E-6, -1.86582444494654E-8, 0.9999911889155071))), altCameraToTarget=Transform3d(Translation3d(X: 1.66, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(0.015360224759433938, 0.18271968179269105, -1.8414937130728504E-8, -0.9830450556210113))), poseAmbiguity=0.09300779551267624, minAreaRectCorners=[(582.2899551391602,240.58821868896484), (582.2899551391602,153.5469741821289), (669.3841171264648,153.5469741821289), (669.3841171264648,240.58821868896484)], detectedCorners=[(582.2900390625,240.5882568359375), (669.3842163085938,240.5882568359375), (669.3842163085938,153.5469970703125), (582.2900390625,153.5469970703125)]], PhotonTrackedTarget [yaw=18.47921641818692, pitch=8.537024655495838, area=0.11078741344181253, skew=-2.010118503262598E-16, fiducialId=17, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 2.07, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.4999997682866508, 4.0433896356106835E-8, -4.569271006005238E-8, -0.8660255375641598))), altCameraToTarget=Transform3d(Translation3d(X: 2.06, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.7415636403028464, -0.12082015986159203, -0.0697555110167265, 0.6562164467876477))), poseAmbiguity=1.6974514664980234E-6, minAreaRectCorners=[(924.3960266113281,189.0120620727539), (939.0549011230469,189.0120620727539), (939.0549011230469,267.62508392333984), (924.3960266113281,267.62508392333984)], detectedCorners=[(924.39599609375,261.0648498535156), (939.0548706054688,267.6250915527344), (939.0548706054688,200.37429809570312), (924.39599609375,189.01206970214844)]], PhotonTrackedTarget [yaw=-19.758223143830467, pitch=8.53702465549584, area=0.09939412147650728, skew=4.020237006525196E-16, fiducialId=19, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 2.07, Y: 0.75, Z: 0.31), Rotation3d(Quaternion(0.4999996650483592, -3.099303781672891E-8, -3.663813419318984E-8, 0.866025597168771))), altCameraToTarget=Transform3d(Translation3d(X: 2.06, Y: 0.74, Z: 0.31), Rotation3d(Quaternion(0.7561197823567539, 0.11990725499348533, -0.06922842242073479, -0.639619066677846))), poseAmbiguity=1.1425056527514243E-6, minAreaRectCorners=[(318.8323974609375,189.0120620727539), (331.9837646484375,189.0120620727539), (331.9837646484375,267.62508392333984), (318.8323974609375,267.62508392333984)], detectedCorners=[(318.8323974609375,267.6250915527344), (331.9837646484375,261.0648498535156), (331.9837646484375,189.01206970214844), (318.8323974609375,200.37429809570312)]], PhotonTrackedTarget [yaw=18.393596724148683, pitch=16.588438039221547, area=0.05831158178302252, skew=-4.148346689679228E-16, fiducialId=15, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: -2.09, Z: 1.87), Rotation3d(Quaternion(6.703658756909703E-5, 0.25882047821907606, -9.663752909006007E-9, -0.9659254399592883))), altCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: -2.08, Z: 1.87), Rotation3d(Quaternion(0.29322390531751374, -0.026333488848543418, -0.07856957352479588, 0.9524458571654041))), poseAmbiguity=0.0065136984921991825, minAreaRectCorners=[(916.8517155342199,110.84704564453403), (921.0861688502309,83.94157738856524), (943.6954036064051,87.49987818359097), (939.4609502903941,114.40534643955976)], detectedCorners=[(916.8515625,110.84705352783203), (939.7178344726562,110.84705352783203), (943.6952514648438,87.49988555908203), (920.5260009765625,87.49988555908203)]], PhotonTrackedTarget [yaw=-18.82484947725959, pitch=16.588438958105282, area=0.058311465816384744, skew=0.0, fiducialId=14, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: 2.14, Z: 1.87), Rotation3d(Quaternion(-6.891400826825043E-6, -0.2588179358294953, -5.199719194104445E-8, 0.9659261234926122))), altCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: 2.14, Z: 1.87), Rotation3d(Quaternion(0.29991256795491517, 0.02627425524377147, -0.08036096854753694, -0.9502127287235081))), poseAmbiguity=8.445871062576771E-4, minAreaRectCorners=[(327.92856002484416,87.49986054651912), (350.5087122204135,83.85287234265728), (354.8686201509371,110.84703276402776), (332.28846795536776,114.4940209678896)], detectedCorners=[(332.0023498535156,110.84705352783203), (354.86859130859375,110.84705352783203), (351.09771728515625,87.49988555908203), (327.92852783203125,87.49988555908203)]], PhotonTrackedTarget [yaw=-0.14509719846595645, pitch=1.7255368230536097, area=0.02160764135987847, skew=0.0, fiducialId=10, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 10.23, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(-1.0295761621148538E-5, -8.084222760995631E-6, -2.04782545920601E-8, 0.9999999999143211))), altCameraToTarget=Transform3d(Translation3d(X: 10.23, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(0.0025319181695904747, 0.03010358563854676, -2.0468299721798644E-8, -0.999543577600339))), poseAmbiguity=0.0015105970669537783, minAreaRectCorners=[(630.2276611328125,326.12001037597656), (644.343505859375,326.12001037597656), (644.343505859375,340.22727966308594), (630.2276611328125,340.22727966308594)], detectedCorners=[(630.2276611328125,340.2272644042969), (644.343505859375,340.2272644042969), (644.343505859375,326.1199951171875), (630.2276611328125,326.1199951171875)]], PhotonTrackedTarget [yaw=-22.987755655196672, pitch=7.758182508261173, area=0.010489831527239504, skew=0.0, fiducialId=3, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 9.56, Y: 4.06, Z: 1.30), Rotation3d(Quaternion(0.7071067657322373, 5.466843644441611E-9, -2.2102775165677713E-9, -0.7071067966408575))), altCameraToTarget=Transform3d(Translation3d(X: 9.56, Y: 4.06, Z: 1.30), Rotation3d(Quaternion(0.3719193487778984, -0.0879433890093539, -0.08794338319612836, 0.9198956026018346))), poseAmbiguity=5.406138006947003E-5, minAreaRectCorners=[(265.3467559814453,231.86805725097656), (271.7524871826172,231.86805725097656), (271.7524871826172,249.0147247314453), (265.3467559814453,249.0147247314453)], detectedCorners=[(265.34674072265625,247.0902099609375), (271.7524719238281,249.0147247314453), (271.7524719238281,234.05319213867188), (265.34674072265625,231.86805725097656)]], PhotonTrackedTarget [yaw=3.7276660345183603, pitch=1.6611816588978607, area=0.00885040869434306, skew=0.0, fiducialId=11, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.4999994585717251, -1.817670065573651E-7, 1.2135625904186043E-7, -0.8660257163779457))), altCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.5550332119109648, -0.025006233306798645, -0.014437336545705781, 0.8313268823303323))), poseAmbiguity=4.6016182750463486E-5, minAreaRectCorners=[(693.4620971679688,327.2079162597656), (699.4788208007812,327.2079162597656), (699.4788208007812,341.1042175292969), (693.4620971679688,341.1042175292969)], detectedCorners=[(693.4620971679688,340.85540771484375), (699.4788208007812,341.1042175292969), (699.4788208007812,327.6388244628906), (693.4620971679688,327.2079162597656)]], PhotonTrackedTarget [yaw=-4.00525859514957, pitch=1.6611816588978607, area=0.008766284113335132, skew=0.0, fiducialId=9, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: 0.75, Z: 0.31), Rotation3d(Quaternion(0.500000181239727, 1.7044840458502186E-7, 1.1499737195830306E-7, 0.8660252991455839))), altCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: 0.74, Z: 0.31), Rotation3d(Quaternion(0.5590550326950174, 0.02499802948839558, -0.014432626508002366, -0.8286279431881058))), poseAmbiguity=4.647707464755513E-5, minAreaRectCorners=[(575.2939147949219,327.2079162597656), (581.2534484863281,327.2079162597656), (581.2534484863281,341.1042175292969), (575.2939147949219,341.1042175292969)], detectedCorners=[(575.2938842773438,341.1042175292969), (581.25341796875,340.85540771484375), (581.25341796875,327.2079162597656), (575.2938842773438,327.6388244628906)]], PhotonTrackedTarget [yaw=-13.013527549234418, pitch=5.774606115869813, area=0.00810662413641694, skew=0.0, fiducialId=2, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: 3.40, Z: 1.49), Rotation3d(Quaternion(0.45399169396254485, 8.99380585062115E-7, -2.2403447691443645E-7, -0.891005915699868))), altCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: 3.40, Z: 1.49), Rotation3d(Quaternion(0.24054809417232706, -0.08734474597081779, -0.044504520999287145, 0.9656743019009975))), poseAmbiguity=1.7114615184254944E-4, minAreaRectCorners=[(433.60072326660156,265.81459045410156), (441.21104431152344,265.81459045410156), (441.21104431152344,276.43455505371094), (433.60072326660156,276.43455505371094)], detectedCorners=[(433.6007080078125,275.6762390136719), (441.2110290527344,276.4345703125), (441.2110290527344,266.66217041015625), (433.6007080078125,265.8146057128906)]], PhotonTrackedTarget [yaw=12.821680417572855, pitch=5.774606115869813, area=0.0080768145150311, skew=9.989928269962555E-17, fiducialId=1, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: -3.34, Z: 1.49), Rotation3d(Quaternion(0.45398946342152463, -6.778445957866807E-7, -1.712608610482391E-7, 0.8910070522177405))), altCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: -3.34, Z: 1.49), Rotation3d(Quaternion(0.2437759529135235, 0.08741151548352954, -0.04453826421187679, -0.964856908957473))), poseAmbiguity=1.8220607307739556E-4, minAreaRectCorners=[(834.7210388183594,265.81459045410156), (842.3033752441406,265.81459045410156), (842.3033752441406,276.43455505371094), (834.7210388183594,276.43455505371094)], detectedCorners=[(834.7210083007812,276.4345703125), (842.3033447265625,275.6762390136719), (842.3033447265625,265.8146057128906), (834.7210083007812,266.66217041015625)]]], multitagResult=Optional[MultiTargetPNPResult [estimatedPose=PnpResult [best=Transform3d(Translation3d(X: 2.00, Y: 4.00, Z: -0.00), Rotation3d(Quaternion(1.0, -0.0, -0.0, -0.0))), bestReprojErr=2.1567513613263145E-5, alt=Transform3d(Translation3d(X: 2.00, Y: 4.00, Z: -0.00), Rotation3d(Quaternion(1.0, -0.0, -0.0, -0.0))), altReprojErr=2.1567513613263145E-5, ambiguity=0.0], fiducialIDsUsed=[1, 2, 3, 9, 10, 11, 14, 15, 17, 18, 19]]]]

NEW

    PhotonPipelineResult [metadata=PhotonPipelineMetadata [captureTimestampMicros=304084, publishTimestampMicros=304084, sequenceID=1, timeSinceLastPong=1024], targets=[PhotonTrackedTarget [yaw=-0.8951797020245975, pitch=10.529540329891427, area=0.8225680236274558, skew=0.0, fiducialId=18, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 1.66, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(-0.004197867305465619, -1.1983705590634663E-6, -1.86582444494654E-8, 0.9999911889155071))), altCameraToTarget=Transform3d(Translation3d(X: 1.66, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(0.015360224759433938, 0.18271968179269105, -1.8414937130728504E-8, -0.9830450556210113))), poseAmbiguity=0.09300779551267624, minAreaRectCorners=[(582.2899551391602,240.58821868896484), (582.2899551391602,153.5469741821289), (669.3841171264648,153.5469741821289), (669.3841171264648,240.58821868896484)], detectedCorners=[(582.2900390625,240.5882568359375), (669.3842163085938,240.5882568359375), (669.3842163085938,153.5469970703125), (582.2900390625,153.5469970703125)]], PhotonTrackedTarget [yaw=18.47921641818692, pitch=8.537024655495838, area=0.11078741344181253, skew=-2.010118503262598E-16, fiducialId=17, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 2.07, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.4999997682866508, 4.0433896356106835E-8, -4.569271006005238E-8, -0.8660255375641598))), altCameraToTarget=Transform3d(Translation3d(X: 2.06, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.7415636403028464, -0.12082015986159203, -0.0697555110167265, 0.6562164467876477))), poseAmbiguity=1.6974514664980234E-6, minAreaRectCorners=[(924.3960266113281,189.0120620727539), (939.0549011230469,189.0120620727539), (939.0549011230469,267.62508392333984), (924.3960266113281,267.62508392333984)], detectedCorners=[(924.39599609375,261.0648498535156), (939.0548706054688,267.6250915527344), (939.0548706054688,200.37429809570312), (924.39599609375,189.01206970214844)]], PhotonTrackedTarget [yaw=-19.758223143830467, pitch=8.53702465549584, area=0.09939412147650728, skew=4.020237006525196E-16, fiducialId=19, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 2.07, Y: 0.75, Z: 0.31), Rotation3d(Quaternion(0.4999996650483592, -3.099303781672891E-8, -3.663813419318984E-8, 0.866025597168771))), altCameraToTarget=Transform3d(Translation3d(X: 2.06, Y: 0.74, Z: 0.31), Rotation3d(Quaternion(0.7561197823567539, 0.11990725499348533, -0.06922842242073479, -0.639619066677846))), poseAmbiguity=1.1425056527514243E-6, minAreaRectCorners=[(318.8323974609375,189.0120620727539), (331.9837646484375,189.0120620727539), (331.9837646484375,267.62508392333984), (318.8323974609375,267.62508392333984)], detectedCorners=[(318.8323974609375,267.6250915527344), (331.9837646484375,261.0648498535156), (331.9837646484375,189.01206970214844), (318.8323974609375,200.37429809570312)]], PhotonTrackedTarget [yaw=18.393596724148683, pitch=16.588438039221547, area=0.05831158178302252, skew=-4.148346689679228E-16, fiducialId=15, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: -2.09, Z: 1.87), Rotation3d(Quaternion(6.703658756909703E-5, 0.25882047821907606, -9.663752909006007E-9, -0.9659254399592883))), altCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: -2.08, Z: 1.87), Rotation3d(Quaternion(0.29322390531751374, -0.026333488848543418, -0.07856957352479588, 0.9524458571654041))), poseAmbiguity=0.0065136984921991825, minAreaRectCorners=[(916.8517155342199,110.84704564453403), (921.0861688502309,83.94157738856524), (943.6954036064051,87.49987818359097), (939.4609502903941,114.40534643955976)], detectedCorners=[(916.8515625,110.84705352783203), (939.7178344726562,110.84705352783203), (943.6952514648438,87.49988555908203), (920.5260009765625,87.49988555908203)]], PhotonTrackedTarget [yaw=-18.82484947725959, pitch=16.588438958105282, area=0.058311465816384744, skew=0.0, fiducialId=14, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: 2.14, Z: 1.87), Rotation3d(Quaternion(-6.891400826825043E-6, -0.2588179358294953, -5.199719194104445E-8, 0.9659261234926122))), altCameraToTarget=Transform3d(Translation3d(X: 6.27, Y: 2.14, Z: 1.87), Rotation3d(Quaternion(0.29991256795491517, 0.02627425524377147, -0.08036096854753694, -0.9502127287235081))), poseAmbiguity=8.445871062576771E-4, minAreaRectCorners=[(327.92856002484416,87.49986054651912), (350.5087122204135,83.85287234265728), (354.8686201509371,110.84703276402776), (332.28846795536776,114.4940209678896)], detectedCorners=[(332.0023498535156,110.84705352783203), (354.86859130859375,110.84705352783203), (351.09771728515625,87.49988555908203), (327.92852783203125,87.49988555908203)]], PhotonTrackedTarget [yaw=-0.14509719846595645, pitch=1.7255368230536097, area=0.02160764135987847, skew=0.0, fiducialId=10, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 10.23, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(-1.0295761621148538E-5, -8.084222760995631E-6, -2.04782545920601E-8, 0.9999999999143211))), altCameraToTarget=Transform3d(Translation3d(X: 10.23, Y: 0.03, Z: 0.31), Rotation3d(Quaternion(0.0025319181695904747, 0.03010358563854676, -2.0468299721798644E-8, -0.999543577600339))), poseAmbiguity=0.0015105970669537783, minAreaRectCorners=[(630.2276611328125,326.12001037597656), (644.343505859375,326.12001037597656), (644.343505859375,340.22727966308594), (630.2276611328125,340.22727966308594)], detectedCorners=[(630.2276611328125,340.2272644042969), (644.343505859375,340.2272644042969), (644.343505859375,326.1199951171875), (630.2276611328125,326.1199951171875)]], PhotonTrackedTarget [yaw=-22.987755655196672, pitch=7.758182508261173, area=0.010489831527239504, skew=0.0, fiducialId=3, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 9.56, Y: 4.06, Z: 1.30), Rotation3d(Quaternion(0.7071067657322373, 5.466843644441611E-9, -2.2102775165677713E-9, -0.7071067966408575))), altCameraToTarget=Transform3d(Translation3d(X: 9.56, Y: 4.06, Z: 1.30), Rotation3d(Quaternion(0.3719193487778984, -0.0879433890093539, -0.08794338319612836, 0.9198956026018346))), poseAmbiguity=5.406138006947003E-5, minAreaRectCorners=[(265.3467559814453,231.86805725097656), (271.7524871826172,231.86805725097656), (271.7524871826172,249.0147247314453), (265.3467559814453,249.0147247314453)], detectedCorners=[(265.34674072265625,247.0902099609375), (271.7524719238281,249.0147247314453), (271.7524719238281,234.05319213867188), (265.34674072265625,231.86805725097656)]], PhotonTrackedTarget [yaw=3.7276660345183603, pitch=1.6611816588978607, area=0.00885040869434306, skew=0.0, fiducialId=11, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.4999994585717251, -1.817670065573651E-7, 1.2135625904186043E-7, -0.8660257163779457))), altCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: -0.69, Z: 0.31), Rotation3d(Quaternion(0.5550332119109648, -0.025006233306798645, -0.014437336545705781, 0.8313268823303323))), poseAmbiguity=4.6016182750463486E-5, minAreaRectCorners=[(693.4620971679688,327.2079162597656), (699.4788208007812,327.2079162597656), (699.4788208007812,341.1042175292969), (693.4620971679688,341.1042175292969)], detectedCorners=[(693.4620971679688,340.85540771484375), (699.4788208007812,341.1042175292969), (699.4788208007812,327.6388244628906), (693.4620971679688,327.2079162597656)]], PhotonTrackedTarget [yaw=-4.00525859514957, pitch=1.6611816588978607, area=0.008766284113335132, skew=0.0, fiducialId=9, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: 0.75, Z: 0.31), Rotation3d(Quaternion(0.500000181239727, 1.7044840458502186E-7, 1.1499737195830306E-7, 0.8660252991455839))), altCameraToTarget=Transform3d(Translation3d(X: 10.64, Y: 0.74, Z: 0.31), Rotation3d(Quaternion(0.5590550326950174, 0.02499802948839558, -0.014432626508002366, -0.8286279431881058))), poseAmbiguity=4.647707464755513E-5, minAreaRectCorners=[(575.2939147949219,327.2079162597656), (581.2534484863281,327.2079162597656), (581.2534484863281,341.1042175292969), (575.2939147949219,341.1042175292969)], detectedCorners=[(575.2938842773438,341.1042175292969), (581.25341796875,340.85540771484375), (581.25341796875,327.2079162597656), (575.2938842773438,327.6388244628906)]], PhotonTrackedTarget [yaw=-13.013527549234418, pitch=5.774606115869813, area=0.00810662413641694, skew=0.0, fiducialId=2, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: 3.40, Z: 1.49), Rotation3d(Quaternion(0.45399169396254485, 8.99380585062115E-7, -2.2403447691443645E-7, -0.891005915699868))), altCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: 3.40, Z: 1.49), Rotation3d(Quaternion(0.24054809417232706, -0.08734474597081779, -0.044504520999287145, 0.9656743019009975))), poseAmbiguity=1.7114615184254944E-4, minAreaRectCorners=[(433.60072326660156,265.81459045410156), (441.21104431152344,265.81459045410156), (441.21104431152344,276.43455505371094), (433.60072326660156,276.43455505371094)], detectedCorners=[(433.6007080078125,275.6762390136719), (441.2110290527344,276.4345703125), (441.2110290527344,266.66217041015625), (433.6007080078125,265.8146057128906)]], PhotonTrackedTarget [yaw=12.821680417572855, pitch=5.774606115869813, area=0.0080768145150311, skew=9.989928269962555E-17, fiducialId=1, objDetectId=-1, objDetectConf=-1.0, bestCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: -3.34, Z: 1.49), Rotation3d(Quaternion(0.45398946342152463, -6.778445957866807E-7, -1.712608610482391E-7, 0.8910070522177405))), altCameraToTarget=Transform3d(Translation3d(X: 14.70, Y: -3.34, Z: 1.49), Rotation3d(Quaternion(0.2437759529135235, 0.08741151548352954, -0.04453826421187679, -0.964856908957473))), poseAmbiguity=1.8220607307739556E-4, minAreaRectCorners=[(834.7210388183594,265.81459045410156), (842.3033752441406,265.81459045410156), (842.3033752441406,276.43455505371094), (834.7210388183594,276.43455505371094)], detectedCorners=[(834.7210083007812,276.4345703125), (842.3033447265625,275.6762390136719), (842.3033447265625,265.8146057128906), (834.7210083007812,266.66217041015625)]]], multitagResult=Optional[MultiTargetPNPResult [estimatedPose=PnpResult [best=Transform3d(Translation3d(X: 2.00, Y: 4.00, Z: -0.00), Rotation3d(Quaternion(1.0, -0.0, -0.0, -0.0))), bestReprojErr=2.1567513613263145E-5, alt=Transform3d(Translation3d(X: 2.00, Y: 4.00, Z: -0.00), Rotation3d(Quaternion(1.0, -0.0, -0.0, -0.0))), altReprojErr=2.1567513613263145E-5, ambiguity=0.0], fiducialIDsUsed=[1, 2, 3, 9, 10, 11, 14, 15, 17, 18, 19]]]]

@mcm001 mcm001 merged commit ae9f731 into PhotonVision:main Apr 29, 2025
39 checks passed
@mcm001 mcm001 deleted the fix-tag-viz branch April 29, 2025 22:07
samfreund pushed a commit to samfreund/photonvision that referenced this pull request Jun 28, 2025
…#1899)

## Description

Fixes PhotonVision#1239

Tag image corners used in `VideoSimUtil` did not match the expected
corner order returned by the detection pipeline of [BL, BR, TR, TL],
causing the tag image to appear flipped.

## Meta

Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [x] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR addresses a bug, a regression test for it is added
@Gold856 Gold856 added the photonlib Things related to the PhotonVision library label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

localhost:1181/2 displays tags upside down and mirrored

4 participants